home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / musicali / splib52d.lha / superplay-lib_DEV / Programmers / Oberon-2 / SuperPlay-Interfaces < prev    next >
Text File  |  1996-11-15  |  5KB  |  195 lines

  1. ; $VER: SuperPlay-Interfaces 1.1 (6.8.96)
  2.  
  3. ; Author    Date       Remark
  4. ; -------------------------------------------------------
  5. ; Indy      07-Jul-96  Version 1.0
  6. ; Indy      06-Aug-96  Version 1.1
  7. ;
  8. ; Feel free to use it for own installer-scripts.
  9.  
  10.  
  11. (SET #selectLang (ASKCHOICE
  12.                    (PROMPT "")
  13.                    (HELP @askchoice-help)
  14.                    (CHOICES "English Installation"
  15.                             "Deutsche Installation" )
  16.                    (DEFAULT 0)
  17.                  )
  18. )
  19.  
  20. (IF (= #selectLang 0) (SET @language "english")  )
  21. (IF (= #selectLang 1) (SET @language "deutsch")  )
  22.  
  23. (IF (= @language "deutsch")
  24.   (
  25.  
  26.   (SET #msg "Mit diesen Installer-Script werden die Interface-Dateien ins \
  27. gewünschte Verzeichnis kopiert und dann anschließend zur Erzeugung \
  28. der .sym- und .obj-Dateien compiliert. Dabei kann gewählt werden welche \
  29. Objektdateien (.obj, .objs etc.) erzeugt werden sollen und in welchen \
  30. Verzeichnis sich das sym- und obj-Verzeichnis befindet.(Der Oberon-Compiler \
  31. muß sich mit Oberon:Oberon aufrufen lassen.)")
  32.   
  33.   (SET #whereInt-Dir  "In welches Verzeichnis sollen die SuperPlay-Interfaces kopiert werden?" )
  34.   (SET #whereSym-Dir (CAT "In welchem gemeinsamen (Ober-)Verzeichnis befindet sich sowohl "
  35.                          "das Verzeichnis \"sym\" also auch \"obj\", bzw. wo sollen diese "
  36.                          "angelegt werden?"))
  37.   (SET #whichObjFiles "Welche Objekt-Files sollen angelegt werden?")
  38.   (SET #doCopy        "Kopiere")
  39.   (SET #bigDataGC     "Großes Datenmodell und GC")
  40.   (SET #bigData       "Großes Datenmodell ohne GC")
  41.   (SET #smallDataGC   "Kleines Datenmodell und GC")
  42.   (SET #smallData     "Kleines Datenmodell ohne GC")
  43.   )
  44. )
  45.  
  46. (IF (= @language "english")
  47.   (
  48.  
  49.   (SET #msg "With this installer-script you can copy and compile the interface-files.")
  50.   (SET #whereInt-Dir  "Into which directory I should copy the SuperPlay-interfaces?" )
  51.   (SET #whereSym-Dir (CAT "In which common (main-)directory are your \"sym\" AND \"obj\" "
  52.                           "drawer, or in which directory should they be created?"))
  53.   (SET #whichObjFiles "Which sort of object-files should be created?")
  54.   (SET #doCopy        "Copy")
  55.   (SET #bigDataGC     "Big data with gc")
  56.   (SET #bigData       "Big data without gc")
  57.   (SET #smallDataGC   "Small data with gc")
  58.   (SET #smallData     "Small data without gc")
  59.   )
  60. )
  61.  
  62. ; *** Procedures ***
  63.  
  64. (PROCEDURE DoIt(
  65.   (TEXTFILE
  66.   (DEST "T:CompileSP")
  67.   (APPEND "STACK 30000\n"
  68.           #parameter)
  69.   )
  70.  
  71.   (EXECUTE "T:CompileSP"
  72.   (PROMPT ("Compile SuperPlay-Interfaces:\n- %s..." #modell))
  73.   (HELP @run-help)
  74.   (CONFIRM)
  75.   )
  76. ))
  77.  
  78.  
  79. (MESSAGE #msg)
  80.  
  81. ; *** Zielverzeichnis für Interfaces ermitteln ***
  82.  
  83. (SET @default-dest "Oberon:Interfaces/")
  84. (SET #int-dir (ASKDIR (PROMPT #whereInt-Dir)
  85.                   (HELP @askfile-help)
  86.                   (DEFAULT @default-dest)
  87.              )
  88. )
  89.  
  90. ; *** Verzeichnis für sym-, obj-Verzeichnis ermitteln ***
  91.  
  92. (SET @default-dest "Oberon:")
  93. (SET #sym-dir (ASKDIR (PROMPT #whereSym-Dir)
  94.                      (HELP @askfile-help)
  95.                      (DEFAULT @default-dest)
  96.              )
  97. )
  98.  
  99.  
  100. ; *** Falls nicht vorhanden sym- und obj-Verzeichnis erstellen ***
  101.  
  102. (IF (NOT (EXISTS (TACKON #sym-dir "sym")))
  103.         (MAKEDIR (TACKON #sym-dir "sym") )
  104. )
  105.  
  106. (IF (NOT (EXISTS (TACKON #sym-dir "obj")))
  107.         (MAKEDIR (TACKON #sym-dir "obj") )
  108. )
  109.  
  110.  
  111. ;*** Interfaces kopieren ***
  112.  
  113. (FOREACH "Interfaces/" "#?"
  114.   (COPYLIB
  115.    (PROMPT (CAT (#doCopy) (" '%s'..." @each-name)))
  116.    (HELP @copylib-help)
  117.    (SOURCE (TACKON "Interfaces/" @each-name))
  118.    (DEST #int-dir)
  119.    (CONFIRM)
  120.   )
  121. )
  122.  
  123.  
  124. ; Oberon Batch-Datei erstellen
  125.  
  126. (TEXTFILE (DEST "T:BatchSP")
  127.           (APPEND (TACKON #int-dir ("spObjects.mod"))
  128.                   ("\n")
  129.                   (TACKON #int-dir ("SuperPlay.mod"))
  130.                   ("\n")
  131.           )
  132. )
  133.  
  134. (SET @execute-dir #sym-dir)
  135. (SET @default-dest #int-dir)
  136.  
  137. (SET #m   "Oberon:Oberon <T:BatchSP >CON:////SuperPlay-Library -m  ")
  138. (SET #ma  "Oberon:Oberon <T:BatchSP >CON:////SuperPlay-Library -ma ")
  139. (SET #md  "Oberon:Oberon <T:BatchSP >CON:////SuperPlay-Library -md ")
  140. (SET #mda "Oberon:Oberon <T:BatchSP >CON:////SuperPlay-Library -mda")
  141.  
  142. (RUN "Resident Oberon:Oberon")
  143. (RUN "ResidentManager")
  144.  
  145. (SET obj
  146.   (ASKOPTIONS
  147.     (PROMPT #whichObjFiles)
  148.     (HELP @askchoice-help)
  149.     (CHOICES (CAT "obj   - " #bigDataGC)
  150.              (CAT "obja  - " #bigData)
  151.              (CAT "objs  - " #smallDataGC)
  152.              (CAT "objsa - " #smallData)
  153.     )
  154.     (DEFAULT 15)
  155.   )
  156. )
  157.  
  158. (IF (IN obj 0)   ; Großes Datenmodell mit Garbage Collector
  159.   (
  160.   (SET #modell #bigDataGC)
  161.   (SET #parameter #m)
  162.   (DoIt)
  163.   )
  164. )
  165.  
  166. (IF (IN obj 1)   ; Großes Datenmodell ohne Garbage Collector
  167.   (
  168.   (SET #modell #bigData)
  169.   (SET #parameter #ma)
  170.   (DoIt)
  171.   )
  172. )
  173.  
  174. (IF (IN obj 2)   ; Kleines Datenmodell mit Garbage Collector
  175.   (
  176.   (SET #modell #smallDataGC)
  177.   (SET #parameter #md)
  178.   (DoIt)
  179.   )
  180. )
  181.  
  182. (IF (IN obj 3)   ; Kleines Datenmodell ohne Garbage Collector
  183.   (
  184.   (SET #modell #smallData)
  185.   (SET #parameter #mda)
  186.   (DoIt)
  187.   )
  188. )
  189.  
  190.  
  191. (DELETE "T:CompileSP")
  192. (DELETE "T:BatchSP")
  193.  
  194. (EXIT "tschuess\n         [|8:)")
  195.